﻿namespace FSAG.UserImporter
{
    /// <summary>
    /// Collection of helpful methods for general use
    /// </summary>
    public static class Helper
    {
        /// <summary>
        /// Checks wheter the given object is null, if so an empty string is returned
        /// </summary>
        /// <param name="value">The value to check for null</param>
        /// <returns>Returns empty string if the value is null, otherwise it returns string representation</returns>
        public static string DefaultIfNull(object value)
        {
            return value == null ? string.Empty : value.ToString();
        }
    }
}
